package InputAndOutput;
import CourseSelection.*;
import java.io.*;
public class IOResults {
	public static void duQu(String dizhi) throws Exception {
		FileReader fileReader=new FileReader(dizhi);
		int length=0;
		String str = "";
		while((length=fileReader.read())!=-1) {
			//System.out.print((char)length);
			str+=(char)length;
		}
		System.out.println(str);
		fileReader.close();
	}
	public static String zhuanHuan(String[][] arr) {
		String str = "";
		for(int k = 0;k<arr[0].length;k++) {	
			for(int i = 0;i<arr.length;i++) {
				if(i ==arr.length-1) {
					str +=arr[i][k]+"\n";
				}
				else {str +=arr[i][k]+"\t";}
			}
		}
		return str;
	}
	 public static void shanChu(String fileName) {
	        File file =new File(fileName);
	        try {
	            if(!file.exists()) {
	                file.createNewFile();
	            }
	            FileWriter fileWriter =new FileWriter(file);
	            fileWriter.write("");
	            fileWriter.flush();
	            fileWriter.close();
	        } catch (IOException e) {
	            e.printStackTrace();
	        }
	    }

	public static void main(String[] args) throws Exception {
		//duQu("C:\\20210617\\选课.txt");
		shanChu("D:\\甄乐宸的文件夹\\changhenge1.txt");

	}
	
}
